<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>登录页</title>
    <style type="text/css">
        #container {
            width: 1000px;
            border: solid 2px green;
            margin: 50px auto;
            padding: 30px;
        }

        input {
            margin: 10px 0;
        }

    </style>
</head>
<body>
<div id="container">
    <form th:action="@{/user/login}" method="post">
        用户名：
        <input type="text" name="username" th:value="${ user?.username }">
        <br>
        密码：
        <input type="password" name="password">
        <br>
        <input type="text" name="captcha" placeholder="请输入验证码" style="height:40px;width:100px;">
        <img alt="验证码加载错误" title="点击更换" th:src="@{/kaptcha}" onclick="this.src = this.src + '?t=' + new Date()" style="vertical-align: middle;">
        <br>
        <input type="submit" value="登录">
        <br>
        <a th:href="@{/user/regist}">没有账号？立即注册！</a>
        <a th:href="@{/user/forget}">忘记密码？</a>
        <br>
        <span style="color:red" th:text="${ message }"></span>
        <br>
    </form>
</div>
</body>
</html>